/**
 * Created by Administrator on 2016/6/7.
 */
//cookie存入
function aCookie(objName,objValue,time){
    var str = objName + "=" + escape(objValue);
    if(time > 0){
        var date 	= new Date();
        var ms 		= time;
        date.setTime(date.getTime() + ms);
        str += "; expires=" + date.toGMTString();
    }
    var cook=str+";path=/";
    document.cookie = cook;
}
/**
 * 讀取cookie
 * @param name
 * @returns {string}
 */
function gCookie(name){
    var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
    if(arr != null) return unescape(arr[2]); return '';
}